🎛️ Digital Input Controls (3 Inputs)
📊 Output Monitor & LED Indicators
DIFFERENCE (D)
A ⊕ B ⊕ Bin
0
BORROW OUT (Bout)
AB + ABin + BBin
0
FULL SUBTRACTOR VERIFIED
Subtraction: 0 − 0 − 0 = 0 (Difference 0, Borrow Out 0)
⚡
Full Subtractor Gate-Level Schematic & Signal Flow
GATE-LEVEL VIEW
🧮 Binary Subtraction Calculation
Minuend (A):
0
− Subtrahend (B):
0
− Borrow In (Bin):
0
Difference (D):
0
Borrow Out (Bout):
0
📝 Step-by-Step Breakdown:
Calculation: 0 − 0 − 0 = 0
• Minuend A is 0, Subtrahend B is 0, Borrow In Bin is 0.
• 0 − 0 = 0 (No borrow generated).
• Subtracting Bin (0): 0 − 0 = 0.
• Final Result: Difference D = 0, Borrow Out Bout = 0.
• Minuend A is 0, Subtrahend B is 0, Borrow In Bin is 0.
• 0 − 0 = 0 (No borrow generated).
• Subtracting Bin (0): 0 − 0 = 0.
• Final Result: Difference D = 0, Borrow Out Bout = 0.
📑 Complete Truth Table (All 8 Input Combinations)
Click any row below to test that input state directly in the simulator
| Row | INPUTS | OUTPUTS | Verification Status | |||
|---|---|---|---|---|---|---|
| A (Minuend) | B (Subtrahend) | Bin (Borrow In) | Difference (D) | Borrow Out (Bout) | ||
| 1 | 0 | 0 | 0 | 0 | 0 | 0 − 0 − 0 = 0 (Bout=0) |
| 2 | 0 | 0 | 1 | 1 | 1 | 0 − 0 − 1 = 1 (Bout=1) |
| 3 | 0 | 1 | 0 | 1 | 1 | 0 − 1 − 0 = 1 (Bout=1) |
| 4 | 0 | 1 | 1 | 0 | 1 | 0 − 1 − 1 = 0 (Bout=1) |
| 5 | 1 | 0 | 0 | 1 | 0 | 1 − 0 − 0 = 1 (Bout=0) |
| 6 | 1 | 0 | 1 | 0 | 0 | 1 − 0 − 1 = 0 (Bout=0) |
| 7 | 1 | 1 | 0 | 0 | 0 | 1 − 1 − 0 = 0 (Bout=0) |
| 8 | 1 | 1 | 1 | 1 | 1 | 1 − 1 − 1 = 1 (Bout=1) |
📚 Educational Guide & Circuit Theory
1. What is a Full Subtractor?
A Full Subtractor is a combinational digital logic circuit that performs binary subtraction taking into account a borrow produced by a lower significant stage. Unlike a Half Subtractor (which only accepts 2 inputs A and B), a Full Subtractor processes 3 binary inputs:
- Minuend (A): The binary digit from which another digit is to be subtracted.
- Subtrahend (B): The binary digit to be subtracted from the minuend.
- Borrow In (Bin): The borrow generated by the previous stage subtraction.
2. Boolean Expressions & Logic Formulation
The two outputs of a Full Subtractor are derived using canonical sum-of-products Boolean expressions:
Difference (D):
D = A ⊕ B ⊕ Bin
D = A ⊕ B ⊕ Bin
Borrow Out (Bout):
Bout = AB + ABin + BBin
(Or equivalently: Bout = AB + (A ⊕ B)′ · Bin)
Bout = AB + ABin + BBin
(Or equivalently: Bout = AB + (A ⊕ B)′ · Bin)
3. Gate-Level Implementation Details
As visualized in the gate-level schematic above, a Full Subtractor can be constructed using:
- 2 XOR Gates: XOR1 computes A ⊕ B, and XOR2 computes (A ⊕ B) ⊕ Bin to yield Difference D.
- 1 NOT Gate: Inverts Minuend A to produce A̅.
- 3 AND Gates: Generate product terms A̅B, A̅Bin, and BBin.
- 1 OR Gate: Combines the three product terms to produce Borrow Out Bout.
4. Practical Applications
Full Subtractors are fundamental building blocks in digital hardware design and computing systems:
- 💻 Arithmetic Logic Units (ALU): Core component in CPUs for executing binary subtraction and comparison operations.
- 🔢 Binary Arithmetic Hardware: Cascaded in multi-bit ripple-borrow or lookahead borrow subtractors.
- 🧠 Microcontrollers & Digital Processors: Embedded hardware processing signed & unsigned binary math.
- 🧮 Digital Calculators: Performing high-speed mathematical operations.
- ⚙️ Digital Computing Systems: Used in DSPs, control units, and FPGA logic cells.